﻿<!--
    Dialog LienHe
    Use for create and edit LienHe
    >>> Author: cyworld8x
-->
    <Window  
        xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"  
        x:Class="OODCRM.Dialogs.LienHeDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Dialog Tổ chức" Height="690" Width="Auto" MinHeight="610" MinWidth="600">
    <Grid Height="Auto" Width="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="120"/>

        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Column="0" Grid.ColumnSpan="2"  Name="tabControl_tabThemLienHeDialog" VerticalAlignment="Top" >
            <TabItem Header="Thông tin chung" Name="tabItemThongTinChung_tabThemLienHeDialog">
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>

                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>

                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Border Margin="5" CornerRadius="5" Grid.ColumnSpan="2" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Mã hiệu (*)" Margin="5"/>
                            <TextBox x:Name="tbxMaHieu_tabThemLienHeDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="6"
                         MinWidth="150" Text="{Binding MaHieu}"/>
                            <TextBlock Text="Xưng hô" Margin="5" Grid.Row="1"/>
                            <ComboBox x:Name="cbxXungHo_tabThemLienHeDialog" Grid.Row="1" 
                          Grid.Column="1"  Margin="5"
                          SelectedValue="{Binding XungHo}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding }"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Họ và đệm" Margin="5" Grid.Column="2" Grid.Row="1" />
                            <TextBox x:Name="tbxHoVaDem__tabThemLienHeDialog" Grid.Row="1" 
                         Grid.Column="3"  Margin="5"
                         Text="{Binding }" />
                            <TextBlock Text="Tên" Margin="5" Grid.Column="4" Grid.Row="1"/>
                            <TextBox x:Name="tbxTen__tabThemLienHeDialog" Grid.Row="1" 
                         Grid.Column="5"  Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding TenToChuc}" />
                            <TextBlock Text="Họ và tên (*)" Margin="5" Grid.Row="2"/>
                            <TextBox x:Name="tbxHoVaTen_tabThemLienHeDialog" Grid.Row="2" Grid.ColumnSpan="6" 
                         Grid.Column="1"  Margin="5"
                         Text="{Binding TenToChuc}"  />
                            

                            <TextBlock Text="Tổ chức (*)" Margin="5" Grid.Row="3"/>
                            <TextBox x:Name="tbxChuQuan_tabThemLienHeDialog" Grid.Row="3" Grid.ColumnSpan="5" 
                         Grid.Column="1"  Margin="5"
                         Text="{Binding TenToChuc}"  />
                            <Button x:Name="btnDoiChuQuan_tabThemLienHeDialog" Content="Đổi" Grid.Row="3" 
                         Grid.Column="6"  Margin="5"                        
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
                Width="60" IsDefault="True"/>

                        </Grid>
                    </Border>
                    <Border Margin="5,5,5,5" CornerRadius="5" Grid.Row="1" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                            </Grid.RowDefinitions>

                            <TextBlock Text="Chức danh" Margin="5"/>
                            <TextBox x:Name="tbxChucDanh_tabThemLienHeDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding Tel}"/>
                            <TextBlock Text="Lĩnh vực" Margin="5" Grid.Row="1" />
                            <TextBox x:Name="tbxTelCQ_tabThemLienHeDialog" Grid.Row="1"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding TelCQ}"/>
                            <TextBlock Text="Fax" Margin="5" Grid.Row="2" />
                            <TextBox x:Name="tbxFax_tabThemLienHeDialog" Grid.Row="2"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding Fax}"/>
                            <TextBlock Text="Mobile" Margin="5" Grid.Row="3" />
                            <TextBox x:Name="tbxMobile_tabThemLienHeDialog" Grid.Row="3"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding Mobile}"/>
                            <TextBlock Text="Mobile khác" Margin="5" Grid.Row="4" />
                            <TextBox x:Name="tbxMobileKhac_tabThemLienHeDialog" Grid.Row="4"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding MobileKhac}"/>
                            <TextBlock Text="Tel NR" Margin="5" Grid.Row="5" />
                            <TextBox x:Name="tbxTelNR_tabThemLienHeDialog" Grid.Row="5"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding Tel}"/>
                            <TextBlock Text="Tel khác" Margin="5" Grid.Row="6" />
                            <TextBox x:Name="tbxTelKhac_tabThemLienHeDialog" Grid.Row="6"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding TelKhac}"/>
                            <TextBlock Text="Email" Margin="5" Grid.Row="7" />
                            <TextBox x:Name="tbxEmail_tabThemLienHeDialog" Grid.Row="7"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding Email}"/>
                            <TextBlock Text="Phòng ban" Margin="5" Grid.Row="8" />
                            <TextBox x:Name="tbxPhongBan_tabThemLienHeDialog" Grid.Row="8"  Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         Text="{Binding PhongBan}"/>

                        </Grid>
                    </Border>
                    <Border Margin="5,5,5,5" CornerRadius="5"  Grid.Row="1" Grid.Column="2" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="70"/>


                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Trợ lý" Margin="5"/>
                            <TextBox x:Name="tbxTroLy_tabThemLienHeDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="3" 
                         Text="{Binding TroLy}"/>
                            <TextBlock Text="Tel trợ lý" Margin="5" Grid.Row="1"/>
                            <TextBox x:Name="TelTroLy_tabThemLienHeDialog" Grid.Row="1" 
                         Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                         Text="{Binding TelTroLy}" />
                            <TextBlock Text="Email " Margin="5" Grid.Row="2"/>
                            <TextBox x:Name="tbxEMail_tabThemLienHeDialog" Grid.Row="2" 
                         Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                         Text="{Binding Email}"  />
                            
                            <TextBlock Text="Phân loại" Margin="5" Grid.Row="3" />
                            <ComboBox x:Name="cbxPhanLoai_tabThemLienHeDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenPhanLoai}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Nguồn gốc" Margin="5" Grid.Row="4" />
                            <ComboBox x:Name="cbxNguonGoc_tabThemLienHeDialog" Grid.Row="4" 
                          Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAI}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenPhanLoai}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Ngày sinh " Margin="5" Grid.Row="5"/>
                            <toolkit:DatePicker x:Name="dpNgaySinh_tabThemLienHeDialog" Grid.Column="1" Grid.Row="5" 
                          Margin="5" Text="{Binding NgaySinh}"  />
                            <TextBlock Text="Diễn giải " Margin="5" Grid.Row="6"/>
                            <TextBox x:Name="tbxDienGiaiLienHe_tabThemLienHeDialog" Grid.Row="6" 
                         Grid.Column="1"  Margin="5" Grid.ColumnSpan="3" MinHeight="100"
                         Text="{Binding DienGiai}"  />
                            <TextBlock Text="Chủ sở hữu" Margin="5" Grid.Row="7"/>
                            <TextBox x:Name="tbxChuSoHuu_tabThemLienHeDialog" Grid.Row="7" 
                         Grid.Column="1"  Margin="5" Grid.ColumnSpan="2"
                         Text="{Binding DienGiai}"  />
                            <Button x:Name="btnDoiChuSoHuu_tabThemLienHeDialog" Content="Đổi" Grid.Row="7" 
                         Grid.Column="3"  Margin="5"                        
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
                Width="60" IsDefault="True"/>
                            <CheckBox x:Name="chkDungChung_tabThemLienHeDialog" Content="Dùng chung"  Grid.Column="0"  Grid.Row="8"  Margin="5,20,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding a }"/>
                            <CheckBox x:Name="chkKhongEmail_tabThemLienHeDialog" Content="Không Email"  Grid.Column="1"  Grid.Row="8"  Margin="5,20,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding a}"/>
                            <CheckBox x:Name="chkKhongGoiDien_tabThemLienHeDialog" Content="Không gọi điện"  Grid.Column="2"  Grid.Row="8"  Margin="5,20,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding a}"/>


                        </Grid>
                    </Border>
                    <Border Margin="5" CornerRadius="5" Grid.Row="3" Grid.ColumnSpan="2" >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="110"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                            </Grid.RowDefinitions>
                            <CheckBox x:Name="chkNgungTheoDoi_tabThemLienHeDialog" Content="Ngừng theo dõi" Margin="5,5,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding NgungTheoDoi}"/>
                            <TextBlock Text="Là liên hệ từ ngày " Margin="5" Grid.Row="0" Grid.Column="1"
                           HorizontalAlignment="Right" VerticalAlignment="Top"/>
                            <toolkit:DatePicker x:Name="dpNgayTaoLienHe_tabThemLienHeDialog" Grid.Row="0" Grid.Column="2" Text="{Binding NgayTao}"  />


                        </Grid>
                    </Border>
                </Grid>
            </TabItem>
            <TabItem Header="Địa chỉ" Name="tabItemDiaChi_tabThemLienHeDialog">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>

                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>


                    </Grid.RowDefinitions>
                    <Border Margin="5" CornerRadius="5" Grid.Column="0" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Địa chỉ cơ quan:" Margin="5"/>
                            <TextBox x:Name="tbxDiaChiCQ_tabThemLienHeDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         MinHeight="100" Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Tỉnh/Tp " Grid.Row="2" Margin="5"/>
                            <ComboBox x:Name="cbxTinhThanhCQ_tabThemLienHeDialog" Grid.Row="2" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Quận/Huyện " Grid.Row="3" Margin="5"/>
                            <ComboBox x:Name="cbxQuanHuyenCQ_tabThemLienHeDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Mã vùng:" Grid.Row="4" Margin="5"/>
                            <TextBox x:Name="tbxMaVungCQ_tabThemLienHeDialog" Grid.Row="4" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Quốc gia " Grid.Row="5" Margin="5"/>
                            <ComboBox x:Name="cbxQuocGiaCQ_tabThemLienHeDialog" Grid.Row="5" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>

                        </Grid>
                    </Border>
                    <Border Margin="5" CornerRadius="5" Grid.Column="1" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Địa chỉ nhà riêng:" Margin="5"/>
                            <TextBox x:Name="tbxDiaChiNR_tabThemLienHeDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         MinHeight="100" Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Tỉnh/Tp " Grid.Row="2" Margin="5"/>
                            <ComboBox x:Name="cbxTinhThanhNR_tabThemLienHeDialog" Grid.Row="2" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Quận/Huyện " Grid.Row="3" Margin="5"/>
                            <ComboBox x:Name="cbxQuanHuyenNR_tabThemLienHeDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Mã vùng:" Grid.Row="4" Margin="5"/>
                            <TextBox x:Name="tbxMaVungNR_tabThemLienHeDialog" Grid.Row="4" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Quốc gia " Grid.Row="5" Margin="5"/>
                            <ComboBox x:Name="cbxQuocGiaNR_tabThemLienHeDialog" Grid.Row="5" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>

                        </Grid>
                    </Border>
                </Grid>
            </TabItem>
        </TabControl>
        <Button x:Name="btnCat_tabThemLienHeDialog" Content="Cất" Grid.Row="1" Grid.Column="0" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35"  IsDefault="True"/>
        <Button x:Name="btnHuyBo_tabThemLienHeDialog" Content="Huỷ bỏ" Grid.Row="1" Grid.Column="1" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35" IsCancel="True"/>
    </Grid>
</Window>
